/* Header file for function.c */

/* By:   S.C. Molitor (smolitor@bme.jhu.edu)
   Date: February 22, 1999 */


// BOLTZMANN - sum of Boltzmann functions with offset & scaling
//             sum is 1 / (1 + Kn + Kn * Kn-1 + Kn * Kn-1 * Kn-2 + ...)
//             each Boltzmann has a slope & xhalf:  Ki = exp(-ki * (x - xi))
//             first two overall parameters are offset & scaling
//             must have 2N + 2 parameters for N Boltzmanns

double boltzmann(double	x,		// x value, returns f(p, x)
				 double	p[],	// parameter values in p
				 double	dfdp[],	// partial derivatives df/dp
				 int	npar);	// number of parameters in p


// EXPONENTIAL - sum of exponential functions with offset
//               each exponential must have an amplitude & time constant
//               first overall parameter is offset
//               must have 2N + 1 parameters for N exponentials

double exponential(double	x,		// x value, returns f(p, x)
				   double	p[],	// parameter values in p
				   double	dfdp[],	// partial derivatives df/dp
				   int		npar);	// number of parameters in p


// GAUSSIAN - sum of Gaussian PDF functions with offset & scaling
//            each Gaussian must have an amplitude, mean & std. dev.
//            first overall parameter is offset
//            must have 3N + 1 parameters for N Gaussians

double gaussian(double	x,		// x value, returns f(p, x)
				double	p[],	// parameter values in p
				double	dfdp[],	// partial derivatives df/dp
				int		npar);	// number of parameters in p
